﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace Hockey.UILayer.Views
{
    /// <summary>
    /// Interaction logic for ProgressControl.xaml
    /// </summary>
    public partial class ProgressControl : UserControl
    {
        private DispatcherTimer _timer;

        public ProgressControl()
        {
            InitializeComponent();

            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMilliseconds(40);
            _timer.Tick += Timer_Tick;
            //_timer.Start();
        }

        void Timer_Tick(object sender, EventArgs e)
        {
            int value = uxProgress.Progress;
            value++;
            if (value > 100)
                value = 0;
            uxProgress.Progress = value;
        }
    }
}
